//========encoding:utf-8=========
/*
 * @describe:  三目运算符
 * @author:mhao
 * @copyright:chinasoft.cn
 * @date:2020年3月30日   下午3:20:24
 */
package edu.chinasoft.mapper;


import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import edu.chinasoft.domain.Application;
import edu.chinasoft.domain.PageUnitForApplication;
import edu.chinasoft.domain.Role;
import edu.chinasoft.domain.User;

@Repository("applicationMapper")
public interface ApplicationMapper {
	//分页查询某用户的请假申请表
	PageUnitForApplication getRecordNumById(User user);
	List<Application> selectUnitApplicationById(Map<String,Object>map);
	//添加
	Role selectRoleByUser(User user);
	List<User> selectUserByRole(Role role);
	boolean insertApplication(Application addApplication);
	boolean insertItem(Application application);
	//分页查询当前用户未提交的请假申请表
	PageUnitForApplication getNoSubmitApplicationRecordById(User user);
    List<Application> selectNoSubmitApplicationById(Map<String,Object> map);
	//更新请假申请表
    Application selectApplicationById(Application application);
    boolean updateApplicationById(Application application);
    boolean updateItemByApplicationIdAndState(Application application);
    //撤销请假申请表
    boolean deleteItem(Application application);
    boolean deleteApplication(Application application);
    //分页查询当前用户需审核的请假申请表
    PageUnitForApplication getApprovalApplicationRecordById(User user);
    List<Application> selectApprovalApplicationById(Map<String,Object> map);
}
